2024 Method
Changes 0
M

Element.ChangeTypeId

Description:
Changes the type of all elements in the given set.
Remarks:
In some cases, applying a change in type will result in a new element being created. The only active examples of this are when applying a normal wall type to a curtain panel, or converting such a wall back to a curtain panel. Then return map would have (original element id, new element id) pair(s). Note: this function needs an open transaction. Note: this function calls regeneration.
Overloads (2):
ChangeTypeId(Document,ICollection[ElementId],ElementId)
public static IDictionary<ElementId, ElementId> ChangeTypeId(
	Document document,
	ICollection<ElementId> elementIds,
	ElementId typeId
)
Return Value IDictionary The map of original element IDs to the new element IDs if some elements were replaced by new elements (the map is empty if no elements were replaced)